﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>Ubtrip商旅</title>
<!-- JS File -->
<link rel="stylesheet" type="text/css" href="../container/assets/skins/sam/container.css" />
<link rel="stylesheet" type="text/css" href="../../base.css"/>
</head>
<body class="page yui-skin-sam page-min-width"><!-- / 页尾　-->
<input name="" type="text" id="fromInput" class="input-default inputtext999" />
<input name="" type="text" id="toInput" class="input-default inputtext999" /><input type="button" value="改变数据" id="haha" />
<br />
<select><option>想遮住我吗？</option></select>

<br /><br /><br /><br />
<p>说明：

</p>
<script src="../yahoo-dom-event/yahoo-dom-event.js" type="text/javascript"></script>
<script src="../element/element.js" type="text/javascript"></script>
<script src="../event/event.js" type="text/javascript"></script>
<script src="../datasource/datasource.js" type="text/javascript"></script>
<script src="../autocomplete/autocomplete.js" type="text/javascript"></script>
<script src="../city_data.js" type="text/javascript"></script>
<script src="../common.js" type="text/javascript"></script>
<script type="text/javascript">
    YAHOO.util.Event.onDOMReady(function () {
        var ac = new Ssharing_AutoComplete({
            defaultData: ssharing_data.hotCity,
            searchData: ssharing_data.citys,
            input: "fromInput",
            initValue: "默认文字",
            width: 300,
            itemSelectCallBack: function (scope, arg) { alert("你选中了" + this.getSelected()); console.log(scope) },
            callBackArgs: { arg1: "参数1", arg2: "参数2" }
        });
        alert(ac.selectData);
        document.getElementById("haha").onclick = function () {
            ac.setData(ssharing_data.folksdata, ssharing_data.citys);
        }

        new Ssharing_AutoComplete({
            searchData: ssharing_data.citys,
            input: "toInput"
        });
    });
</script>
</body>
</html>

